package com.shop.user.common;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

import com.shop.core.HttpMessageResult;


@ControllerAdvice
public class BaseExceptionHandler {
	
    @ExceptionHandler(value = Exception.class)
    @ResponseBody
    public HttpMessageResult error(Exception e){
        e.printStackTrace();        
        return HttpMessageResult.doHttp(400, e.getMessage());
    }
}
